package com.parking.mapper;

import com.parking.pojo.Receipt;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface ReceiptMapper {
    //增加
    @Insert("insert into receipt(receiptuser, receiptmony, receiptreduce,receiptflag) values (#{receiptuser},#{receiptmony},#{receiptreduce},#{receiptflag});")
    int add(Receipt receipt);

    //删除
    @Delete("delete from receipt where receiptid = #{receiptid}")
    int delete(int receiptid);


    //修改
    @Update("update receipt set  receiptmony = #{receiptmony} where receiptid = #{receiptid}")
    int updateById(Integer receiptmony,Integer receiptid);

    //查询
    @Select("select * from receipt where receiptid = #{receiptid}")
    Receipt selectById(int receiptid);
}
